.cube {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /*transform-origin*/
  -webkit-transform-origin: 30px 30px;
  -moz-transform-origin: 30px 30px;
  -ms-transform-origin: 30px 30px;
  -o-transform-origin: 30px 30px;
  transform-origin: 30px 30px;
  /*transform*/
  -webkit-transform: perspective(300px);
  -moz-transform: perspective(300px);
  -ms-transform: perspective(300px);
  -o-transform: perspective(300px);
  transform: perspective(300px);
  /*transform-style*/
  -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  -ms-transform-style: preserve-3d;
  -o-transform-style: preserve-3d;
  transform-style: preserve-3d;
}



.cube-button {
  cursor: pointer;
}
.cube-button:hover,
.cube-button.hover {
  color: white;
  background: rgba(0,153,255,0.5);
  outline: 1px solid #09f;
}


.cube-face,
.cube-edge,
.cube-corner {
  /*backface-visibility*/
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  -ms-backface-visibility: hidden;
  -o-backface-visibility: hidden;
  backface-visibility: hidden;
}

.cube-face {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  color: black;
  font-family: sans-serif;
  background: #eee;
}

.cube-face-label {
  display: block;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  height: 10px;
  color: #606060;
  font-family: "Trebuchet MS", Helvetica, Arial, sans-serif;
  line-height: 13px;
  text-align: center;
  font-size: 13px;
  text-transform: uppercase;
  -webkit-transform: scaleY(2);
  -moz-transform: scaleY(2);
  -ms-transform: scaleY(2);
  -o-transform: scaleY(2);
  transform: scaleY(2);
}

.cube-face-button {
  position: absolute;
  top: 16px;
  left: 16px;
  bottom: 16px;
  right: 16px;
}

.cube-face-front {
  /*transform*/
  -webkit-transform: rotateY(0deg) translateZ(30px);
  -moz-transform: rotateY(0deg) translateZ(30px);
  -ms-transform: rotateY(0deg) translateZ(30px);
  -o-transform: rotateY(0deg) translateZ(30px);
  transform: rotateY(0deg) translateZ(30px);
}

.cube-face-back {
  /*transform*/
  -webkit-transform: rotateY(180deg) translateZ(30px);
  -moz-transform: rotateY(180deg) translateZ(30px);
  -ms-transform: rotateY(180deg) translateZ(30px);
  -o-transform: rotateY(180deg) translateZ(30px);
  transform: rotateY(180deg) translateZ(30px);
}

.cube-face-right {
  /*transform*/
  -webkit-transform: rotateY(90deg) translateZ(30px);
  -moz-transform: rotateY(90deg) translateZ(30px);
  -ms-transform: rotateY(90deg) translateZ(30px);
  -o-transform: rotateY(90deg) translateZ(30px);
  transform: rotateY(90deg) translateZ(30px);
}

.cube-face-left {
  /*transform*/
  -webkit-transform: rotateY(-90deg) translateZ(30px);
  -moz-transform: rotateY(-90deg) translateZ(30px);
  -ms-transform: rotateY(-90deg) translateZ(30px);
  -o-transform: rotateY(-90deg) translateZ(30px);
  transform: rotateY(-90deg) translateZ(30px);
}

.cube-face-top {
  /*transform*/
  -webkit-transform: rotateX(90deg) translateZ(30px);
  -moz-transform: rotateX(90deg) translateZ(30px);
  -ms-transform: rotateX(90deg) translateZ(30px);
  -o-transform: rotateX(90deg) translateZ(30px);
  transform: rotateX(90deg) translateZ(30px);
}

.cube-face-bottom {
  /*transform*/
  -webkit-transform: rotateX(-90deg) translateZ(30px);
  -moz-transform: rotateX(-90deg) translateZ(30px);
  -ms-transform: rotateX(-90deg) translateZ(30px);
  -o-transform: rotateX(-90deg) translateZ(30px);
  transform: rotateX(-90deg) translateZ(30px);
}


.cube-face-edge {
  position: absolute;
}
.cube-face-edge-top {
  top: 0;
  right: 16px;
  bottom: 44px;
  left: 16px;
}
.cube-face-edge-right {
  top: 16px;
  right: 0;
  bottom: 16px;
  left: 44px;
}
.cube-face-edge-left {
  top: 16px;
  right: 44px;
  bottom: 16px;
  left: 0;
}
.cube-face-edge-bottom {
  top: 44px;
  right: 16px;
  bottom: 0;
  left: 16px;
}


.cube-face-corner {
  position: absolute;
}
.cube-face-corner-top-right {
  top: 0;
  right: 0;
  bottom: 44px;
  left: 44px;
}
.cube-face-corner-bottom-right {
  top: 44px;
  right: 0;
  bottom: 0;
  left: 44px;
}
.cube-face-corner-bottom-left {
  top: 44px;
  right: 44px;
  bottom: 0;
  left: 0;
}
.cube-face-corner-top-left {
  top: 0;
  right: 44px;
  bottom: 44px;
  left: 0;
}

/*
.cube-button-face-edge {
    outline: 1px solid green;
}
.cube-button-face-corner {
    outline: 1px solid red;
}
*/
